A virtual hard disk is an abstraction which utilizes underlying physical storage media to present a storage image operable with one or more accessing systems as a storage resource. A virtual hard disk may be embodied as an image file providing mapping of virtual hard disk resources to physical storage resources (e.g., data blocks or other memory elements of physical hard disks, solid state disks, flash memory, optical memory, and/or other suitable computer readable media). A virtual hard disk may utilize various file systems, contain disk partitions, store files and folders, etc., thereby providing operation emulating that of a physical hard disk drive of arbitrary size.
There are two main virtual hard disk configurations: fixed-size virtual hard disks and dynamically expanding virtual hard disks. As the name suggests, fixed-size virtual hard disks provide a virtual hard disk of a predetermined, fixed size (e.g., 20 GB, 1 TB, or other selected size supported by the virtualization scheme and underlying physical storage resources). Dynamically expanding virtual hard disks provide a virtual hard disk wherein a maximum size of the dynamically expanding virtual hard disk is specified, and the dynamically expanding virtual hard disk is initially provisioned as a smaller virtual hard disk. As a dynamically expanding virtual hard disk is utilized and physical storage resources allocated thereto are utilized, the size of the dynamically expanding virtual hard disk is expanded to include allocation of additional storage resources, up to the aforementioned maximum size.
From the above, it can be appreciated that a fixed-size virtual hard disk presents a configuration in which the storage space of the fixed-size virtual hard disk is allocated on one or more underlying physical storage resources (e.g., one or more physical hard disks) when the fixed-size virtual hard disk is provisioned. That is, if a fixed-size virtual hard disk of 500 GB is to be provisioned, the full 500 GB of underlying physical storage resources used in providing the fixed-size virtual hard disk would be allocated to the fixed-size virtual hard disk during its provisioning, regardless of the amount of storage resources initially or even ultimately utilized by the fixed-size virtual hard disk. Because the physical storage resources for a fixed-size virtual hard disk must be allocated up front during creation, allocation of space is required even if the space is not used for storing data.
The physical storage resources allocated to the fixed-size virtual hard disk must be initialized for use as the fixed-size virtual hard disk. Such initialization generally requires the physical storage resources be cleared by overwriting the data thereof (referred to herein as clearing the physical storage resources), such as to have any data previously recorded thereon overwritten by zeroes, to prevent any existing data stored by the allocated physical storage resources from being accessible via the fixed-size virtual hard disk (e.g., for data security, to avoid the presence of spurious data, etc.). Such clearing of the physical storage resources requires overwriting the entire allocated space during provisioning of the fixed-size virtual hard disk. Thus, the fixed-size virtual hard disk creation speed is determined primarily by the time required for clearing those storage resources. For example, it requires approximately 1 hour and 40 minutes to provision a 500 GB fixed-size virtual hard disk, including clearing the physical resources allocated to the fixed-size virtual hard disk, using HYPER V MANAGER available from Microsoft Corporation.
It should be appreciated that, although fixed-size virtual hard disks are described above as having a predetermined, fixed size, such fixed-size virtual hard disks may sometimes nevertheless be reconfigured to provide a different (i.e., enlarged) fixed-size. In particular, a fixed-size virtual hard disk may be taken offline (i.e., rendered unavailable to accessing systems) and the fixed-size thereof increased. Provisioning of the reconfigured fixed-size virtual hard disk drive the proceeds similar to that of the initial fixed-size virtual hard disk provisioning. That is, the underlying physical storage resources used in providing the increase in size of the fixed-size virtual hard disk would be allocated to the fixed-sized virtual hard disk and clearing of the added physical storage resources performed. Accordingly, even where increasing the size of a fixed-size virtual hard disk is supported, provisioning of such incremental storage space incurs the initialization delays and unused physical storage resource allocation disadvantages discussed above.
A dynamically expanding virtual hard disk presents a configuration in which the size of the virtual hard disk, at any given time, corresponds to the actual data written to the dynamically expanding virtual hard disk (e.g., includes a number of physical hard disk data blocks to store the data of the virtual hard disk drive plus some level of overhead, such as metadata). Accordingly, a dynamically expanding virtual hard disk may start quite small and grow to its maximum allowable size as new data blocks in the dynamically expanding virtual hard disk are used to store data. For example, a dynamically expanding virtual hard disk may start with some minimal amount of storage space (e.g., 42 KB blocks of disk space) and grow to its maximum allowable size (e.g., 2040 GB) as new data blocks are used.
As can be appreciated from the foregoing, dynamically expanding virtual hard disks do not require all the physical storage resources needed to contain the maximum size of the disk to be allocated to the dynamically expanding virtual hard disk up front (as discussed above with respect to the fixed-size hard disk). However, the physical storage resources that are allocated for use as the dynamically expanding virtual hard disk must, nevertheless, be initialized including clearing of the physical data resources as discussed above with respect to the fixed-size virtual hard disk. Accordingly, although dynamically expanding virtual hard disks can be created relatively rapidly as compared to fixed-sized virtual hard disks (i.e., only initially clearing the smaller storage space of the dynamically expanding virtual hard disk), dynamically expanding virtual hard disks suffer from poorer performance during their use, during expansion, due to the allocation and initialization (i.e., clearing) of additional physical storage resources.
In addition to the aforementioned performance degradation associated with expansion of the dynamically expanding virtual hard disk, dynamically expanding virtual hard disks suffer from input/output (I/O) mis-alignment because of interleaving of meta-data and data blocks resulting from the ad-hoc addition of physical storage resources. In particular, an optimized configuration of physical storage resources and associated meta-data may not be provided as a result of the dynamic allocation of physical storage resources.